var oldVideoId = 'a1'

$('.list-wrapper').on('click', 'li', function () {
    $(this).addClass('active').siblings().removeClass('active');
    var index = $(this).index();
    $('.content').children().eq(index).show().siblings().hide();
    var currentContent = $('.content').children().eq(index);
   
})
    
    console.log(currentVideoVideo)
    stopPlay(oldVideoId);
    playVideo(currentVideoId,currentVideoPic,currentVideoVideo);
    oldVideoId = currentVideoId;

function playVideo(el,pic,video) {
    var videoId = 'ckplayer_' + el
    var clientWidth = document.documentElement.clientWidth;
    var videoHeight = clientWidth / 16 * 9;
    var flashvars={
        f:pic,
        c:0,
        p:1,
        loaded:'loadedHandler'
    };
    var video=[video];
    CKobject.embed('ckplayer/ckplayer.swf', el, videoId,'100%',videoHeight,false,flashvars,video);
}

function loadedHandler() {
}

function stopPlay(el) {
    var videoId = 'ckplayer_' + el
   // CKobject.getObjectById(videoId).videoPause() 
}

// 定义从第一个播放器开始播放
playVideo('a1');